package com.cens.mall.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cens.common.to.SeckillOrderTO;
import com.cens.common.utils.PageUtils;
import com.cens.mall.order.entity.OrderEntity;
import com.cens.mall.order.to.OrderCreateTo;
import com.cens.mall.order.vo.*;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author cens
 * @email wzccens@163.com
 * @date 2020-07-11 15:33:27
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    OrderConfirmVo confirmOrder() throws ExecutionException, InterruptedException;

    OrderSubmitResponseVo submitOrder(OrderSubmitVo orderSubmitVo);

    OrderEntity getOrderByOrderSn(String orderSn);

    void closeOrder(OrderCreateTo entity);

    PayVo getOrderPay(String orderSn);

    PageUtils queryPageWithItem(Map<String, Object> params);

    String handlePayResult(PayAsyncVo vo);

    void createSeckillOrder(SeckillOrderTO order);
}

